home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / tex-k-archive.gz / tex-k-archive / 000036_simon@lia.di.epfl.ch_Thu Oct 7 16:00:28 1993.msg < prev    next >
Internet Message Format  |  1994-10-11  |  9KB

  1. Received: from liasun6.epfl.ch by cs.umb.edu with SMTP id AA07524
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Thu, 7 Oct 1993 16:00:28 -0400
  3. Received: by liasun6.epfl.ch (Smail3.1.28.1 #52)
  4.     id m0ol1VP-0002P3C; Thu, 7 Oct 93 21:00 MET
  5. Message-Id: <m0ol1VP-0002P3C@liasun6.epfl.ch>
  6. Date: Thu, 7 Oct 93 21:00 MET
  7. From: simon@lia.di.epfl.ch (Simon Leinen)
  8. To: simon@lia.di.epfl.ch (Simon Leinen)
  9. Cc: tex-k@cs.umb.edu
  10. Subject: configure and Makefile problems (patches for both dvipsk-5.519b and xdvik-1.2)
  11. In-Reply-To: <m0ol0PV-0002QrC@liasun6.epfl.ch>
  12. References: <m0ol0PV-0002QrC@liasun6.epfl.ch>
  13.  
  14. Oh, almost forgot this: after applying this patch, you should
  15. reconstruct the top-level configure file using a very recent version
  16. of `autoconf'.  Because I assume not everybody has this, here is my
  17. configure, generated using GNU autoconf-1.5.
  18. -- 
  19. Simon.
  20.  
  21. #!/bin/sh
  22. # Guess values for system-dependent variables and create Makefiles.
  23. # Generated automatically using autoconf.
  24. # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  25.  
  26. # This program is free software; you can redistribute it and/or modify
  27. # it under the terms of the GNU General Public License as published by
  28. # the Free Software Foundation; either version 2, or (at your option)
  29. # any later version.
  30.  
  31. # This program is distributed in the hope that it will be useful,
  32. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  33. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  34. # GNU General Public License for more details.
  35.  
  36. # You should have received a copy of the GNU General Public License
  37. # along with this program; if not, write to the Free Software
  38. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  39.  
  40. # Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [--no-create]
  41. #        [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE] [TARGET]
  42. # Ignores all args except --srcdir, --prefix, --exec-prefix, --no-create, and
  43. # --with-PACKAGE unless this script has special code to handle it.
  44.  
  45.  
  46. for arg
  47. do
  48.   # Handle --exec-prefix with a space before the argument.
  49.   if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
  50.   # Handle --host with a space before the argument.
  51.   elif test x$next_host = xyes; then next_host=
  52.   # Handle --prefix with a space before the argument.
  53.   elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
  54.   # Handle --srcdir with a space before the argument.
  55.   elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
  56.   else
  57.     case $arg in
  58.      # For backward compatibility, also recognize exact --exec_prefix.
  59.      -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
  60.     exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  61.      -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  62.     next_exec_prefix=yes ;;
  63.  
  64.      -gas | --gas | --ga | --g) ;;
  65.  
  66.      -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
  67.      -host | --host | --hos | --ho | --h)
  68.     next_host=yes ;;
  69.  
  70.      -nfp | --nfp | --nf) ;;
  71.  
  72.      -no-create | --no-create | --no-creat | --no-crea | --no-cre | --no-cr | --no-c | --no- | --no)
  73.         no_create=1 ;;
  74.  
  75.      -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  76.     prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  77.      -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  78.     next_prefix=yes ;;
  79.  
  80.      -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
  81.     srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  82.      -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
  83.     next_srcdir=yes ;;
  84.  
  85.      -with-* | --with-*)
  86.        package=`echo $arg|sed 's/-*with-//'`
  87.        # Delete all the valid chars; see if any are left.
  88.        if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then
  89.          echo "configure: $package: invalid package name" >&2; exit 1
  90.        fi
  91.        eval "with_`echo $package|sed s/-/_/g`=1" ;;
  92.  
  93.      -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v)
  94.        verbose=yes ;;
  95.  
  96.      *) ;;
  97.     esac
  98.   fi
  99. done
  100.  
  101. trap 'rm -fr conftest* core; exit 1' 1 3 15
  102.  
  103. # NLS nuisances.
  104. # These must not be set unconditionally because not all systems understand
  105. # e.g. LANG=C (notably SCO).
  106. if test "${LC_ALL+set}" = 'set' ; then LC_ALL=C; export LC_ALL; fi
  107. if test "${LANG+set}"   = 'set' ; then LANG=C;   export LANG;   fi
  108.  
  109. rm -f conftest*
  110. compile='${CC-cc} $CFLAGS $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
  111.  
  112. # A filename unique to this package, relative to the directory that
  113. # configure is in, which we can look for to find out if srcdir is correct.
  114. unique_file=kpathsea/kpathsea.texi
  115.  
  116. # Find the source files, if location was not specified.
  117. if test -z "$srcdir"; then
  118.   srcdirdefaulted=yes
  119.   # Try the directory containing this script, then `..'.
  120.   prog=$0
  121.   confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
  122.   test "X$confdir" = "X$prog" && confdir=.
  123.   srcdir=$confdir
  124.   if test ! -r $srcdir/$unique_file; then
  125.     srcdir=..
  126.   fi
  127. fi
  128. if test ! -r $srcdir/$unique_file; then
  129.   if test x$srcdirdefaulted = xyes; then
  130.     echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
  131.   else
  132.     echo "configure: Can not find sources in \`${srcdir}'." 1>&2
  133.   fi
  134.   exit 1
  135. fi
  136. # Preserve a srcdir of `.' to avoid automounter screwups with pwd.
  137. # But we can't avoid them for `..', to make subdirectories work.
  138. case $srcdir in
  139.   .|/*|~*) ;;
  140.   *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
  141. esac
  142.  
  143. # Save the original args to write them into config.status later.
  144. configure_args="$*"
  145.  
  146.  
  147. if test -z "$prefix"
  148. then
  149.   echo checking for tex to derive installation directory prefix
  150.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="$IFS:"
  151.   for dir in $PATH; do
  152.     test -z "$dir" && dir=.
  153.     if test $dir != . && test -f $dir/tex; then
  154.       # Not all systems have dirname.
  155.       prefix=`echo $dir|sed 's%/[^/][^/]*$%%'`
  156.       break
  157.     fi
  158.   done
  159.   IFS="$saveifs"
  160.   echo "    chose installation directory prefix ${prefix}"
  161. fi
  162.  
  163.  
  164. # Use this shell to run the configure scripts.
  165. shell=/bin/sh
  166.  
  167. # Set to `true' (or `false', or whatever) to omit messages.
  168. verbose=echo
  169.  
  170. if test x$srcdirdefaulted = xyes
  171. then
  172.   srcparentdir=..
  173. else
  174.   srcparentdir=${srcdir}
  175. fi
  176.  
  177. # Take the subdir list from the `programs' variable in ./Makefile.in.
  178. programs="`sed -n -e 's/programs *= *//p' $srcdir/Makefile.in`"
  179. if test -z "$programs"; then
  180.   echo 'No assignment to programs variable in ./Makefile.in?!'
  181.   exit 1
  182. fi
  183.  
  184. # Run configure in each program directory that exists, passing all our args.
  185. for d in kpathsea $programs; do
  186.   if test -d ${srcdir}/$d; then
  187.     # Remember the first program directory we find.
  188.     test -z "$first_program" && first_program=$d
  189.     test -d $d || mkdir $d    
  190.     $verbose "Running configure in $d..."
  191.     (cd $d; $shell ${srcparentdir}/$d/configure "$@" --srcdir="${srcparentdir}/$d")
  192.   fi
  193. done
  194.  
  195. if test -n "$prefix"; then
  196.   test -z "$exec_prefix" && exec_prefix='${prefix}'
  197.   prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  198. fi
  199. if test -n "$exec_prefix"; then
  200.   prsub="$prsub
  201. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  202. fi
  203. cat >conftest.def <<EOF
  204. $DEFS
  205. EOF
  206. escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  207. DEFS=`sed "$escape_ampersand_and_backslash" <conftest.def`
  208. rm -f conftest.def
  209.  
  210. trap 'rm -f config.status; exit 1' 1 3 15
  211. echo creating config.status
  212. rm -f config.status
  213. cat > config.status <<EOF
  214. #!/bin/sh
  215. # Generated automatically by configure.
  216. # Run this file to recreate the current configuration.
  217. # This directory was configured as follows,
  218. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  219. #
  220. # $0 $configure_args
  221.  
  222. for arg
  223. do
  224.   case "\$arg" in
  225.     -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  226.     echo running /bin/sh $0 $configure_args
  227.     exec /bin/sh $0 $configure_args ;;
  228.     *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
  229.   esac
  230. done
  231.  
  232. trap 'rm -f Makefile; exit 1' 1 3 15
  233. LIBS='$LIBS'
  234. srcdir='$srcdir'
  235. DEFS='$DEFS'
  236. prefix='$prefix'
  237. exec_prefix='$exec_prefix'
  238. prsub='$prsub'
  239. EOF
  240. cat >> config.status <<\EOF
  241.  
  242. top_srcdir=$srcdir
  243.  
  244. # Allow make-time overrides of the generated file list.
  245. test -n "$gen_files" || gen_files="Makefile"
  246.  
  247. for file in .. $gen_files; do if [ "x$file" != "x.." ]; then
  248.   srcdir=$top_srcdir
  249.   # Remove last slash and all that follows it.  Not all systems have dirname.
  250.   dir=`echo $file|sed 's%/[^/][^/]*$%%'`
  251.   if test "$dir" != "$file"; then
  252.     test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
  253.     test ! -d $dir && mkdir $dir
  254.   fi
  255.   echo creating $file
  256.   rm -f $file
  257.   echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
  258.   sed -e "
  259. $prsub
  260. s%@LIBS@%$LIBS%g
  261. s%@srcdir@%$srcdir%g
  262. s%@DEFS@%$DEFS%
  263. " $top_srcdir/${file}.in >> $file
  264. fi; done
  265.  
  266. exit 0
  267. EOF
  268. chmod +x config.status
  269. test -n "$no_create" || ./config.status
  270.